package com.cqut.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.cqut.model.RoleRigth;

public interface RoleMapperExtra {

	  List<Map<String, Object>> findRolesWithLimit(
		    @Param("roleName")
			String roleName,
			@Param("type")
			String type, 
			@Param("start")
			int start,
			@Param("end")
			int end);

	int insertOperator(
			@Param("name")
			String name, 
			@Param("password")
			String password, 
			@Param("sex")
			String sex, 
			@Param("state")
			String state,
			@Param("type")
			String type, 
			@Param("roleId")
			String roleId);

	int batchInsertPerm(
			@Param("pas")
			List<RoleRigth> pas);


	int deletePermissionForRole(
			@Param("roleIds")
			String[] roleIds);

	Map<String, Object> findMaxCodeByRoleId();

	int deleteByPrimaryKeys(String[] roleIds);

	List<Map<String, Object>> findRolesByLimit(
			@Param(value="roleName")
			String roleName, 
			@Param(value="start")
			int start,
			@Param(value="end")
			int end);

	long findCountByLimit(
			@Param(value="roleName")
			String roleName);

}
